import { request } from '@umijs/max';
import api from '@/services/api';

export async function serverList(params) {
  return request(api.server_list, {
    method: 'GET',
    params,
  });
}

export async function serverDetail(params) {
  return request(api.server_detail, {
    method: 'GET',
    params,
  });
}

export async function serverCreate(data) {
  return request(api.server_create, {
    method: 'POST',
    data,
  });
}

export async function serverUpdate(data) {
  return request(api.server_update, {
    method: 'PUT',
    data,
  });
}

export async function serverDelete(params) {
  return request(api.server_delete, {
    method: 'DELETE',
    params,
  });
}